--*-----------------------------------------------------------------------------
--
-- GetOptionText
--
--*-----------------------------------------------------------------------------
IF EXISTS (
  SELECT 1
    FROM sys.objects
   WHERE type = 'FN'
     AND schema_id = SCHEMA_ID('dbo')
     AND name = 'GetOptionText'
)
DROP FUNCTION GetOptionText
GO
--*-----------------------------------------------------------------------------
CREATE FUNCTION GetOptionText(@key_str VARCHAR(50))
RETURNS VARCHAR(MAX)
AS
BEGIN
  RETURN (SELECT value_text FROM site_option WHERE name = @key_str)
END
GO
